import http from '../common/http.js'

// 发布页面商品分类
export const categoryApi = (parm) =>{
	return http.get('/api/category/getSelectList', parm)
}

// 发布商品
export const releaseApi = (parm)=>{
	return http.post('/api/goods/release', parm)
}

//查询所有分类
export const getCateListApi = ()=>{
	return http.get('/api/category/getCateList')
}

//查询闲置商品列表
export const getUsedListApi = (parm)=>{
	return http.get('/api/goods/getUsedList',parm)
}
//查询求购商品列表
export const getBuyListApi = (parm)=>{
	return http.get('/api/goods/getBuyList',parm)
}

//我的商品列表
export const getMyGoodsListApi = (parm)=>{
	return http.get('/api/goods/getMyGoodsList',parm)
}

//修改发布后的商品信息
export const editApi = (parm)=>{
	return http.post('/api/goods/edit',parm)
}

//下架
export const upanddownpi = (parm)=>{
	return http.post('/api/goods/upanddown',parm)
}
//删除
export const deleteApi = (parm)=>{
	return http.post('/api/goods/delete',parm)
}

